package com.mynewspaper.entity;

public class Role {
	
	private String roleName;

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}
	
	public boolean canEdinNews() {
		return ((this.roleName == "Admin") || (this.roleName == "Editor") || (this.roleName == "User"));
	}
	
	public boolean canRemoveNews() {
		return ((this.roleName == "Admin") || (this.roleName == "Editor") || (this.roleName == "User"));
	}
	
	public boolean canEditAllNews() {
		return ((this.roleName == "Admin") || (this.roleName == "Editor"));
	}
	
	public boolean canRemoveAllNews() {
		return ((this.roleName == "Admin") || (this.roleName == "Editor"));
	}
	
	public boolean canEditProfile() {
		return ((this.roleName == "Admin") || (this.roleName == "Editor") || (this.roleName == "User"));
	}
	
	public boolean canRemoveProfile() {
		return ((this.roleName == "Admin") || (this.roleName == "Editor") || (this.roleName == "User"));
	}
}
